'use strict';

angular.module('app.view.navigation', [])

.controller('navigationCtrl', ['$scope', '$rootScope', '$state', '$window', function($scope, $rootScope, $state, $window) {
    $scope.$state = $state;

    $rootScope.$on('changeSourceType', function(event, type) {
        $scope.sourceType = type;
    });

    $scope.getClass = function(pageType) {
        var typeUrl = 'views/' + pageType;
        return $window.location.hash.indexOf(typeUrl) !== -1 ? 'app-active' : '';
    }
}]);
